﻿Namespace Ventas
    Public Class FrmOrdenProductoConfirmacion

        Public Property Producto As Farmacia.Entity.Ventas.ComprobanteDetalle




        Private Sub btn_NoCobrar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
            Me.DialogResult = Windows.Forms.DialogResult.Retry
            Me.Close()
        End Sub

        Private Sub FrmOrdenProductoConfirmacion_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shown
            If Producto IsNot Nothing Then
                Me.txt_producto.Text = Producto.ProductoNombre
                Me.txt_precioBase.Text = Producto.PrecioBase
                Me.txt_precio.Text = Producto.PrecioBase
            End If
        End Sub

        Private Sub btn_aceptar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_aceptar.Click
            Confirmar()
            Me.DialogResult = Windows.Forms.DialogResult.OK
            Me.Close()
        End Sub
        Public Sub Confirmar()
            Producto.Precio = Me.txt_precio.Text
            Producto.Cantidad = Me.nud_cantidad.Value
            Producto.SubTotal = Producto.Precio * Producto.Cantidad
            Producto.Total = Producto.Precio * Producto.Cantidad
        End Sub

        Private Sub FrmOrdenProductoConfirmacion_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
           
        End Sub

   

 
        Private Sub btn_NoCobrar_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancelar.Click
            Me.DialogResult = Windows.Forms.DialogResult.Cancel
            Me.Close()
        End Sub
    End Class
End Namespace
